<h3> Filter by date:</h3>
<?php
echo $this->Form->create('Tweet',array('action'=>'filtermentions'));
?>
 <!-- import the js and css files to be able to use the datepicker -->
<?php echo $this->Html->script('jquery-1.4.2.min.js'); ?>
<?php echo $this->Html->script('jquery-ui-1.8.4.custom.min.js'); ?>
<?php echo $this->Html->css('start/jquery-ui-1.8.4.custom.css'); ?>

<head>

 <!-- identify datepicker before calling it -->	
<script type="text/javascript">

			$(function(){

				// Datepicker
				$('#datepicker').datepicker({
					inline: true
				});

			});
		</script>

</head>


<script type="text/javascript">

			$(function(){

				// Datepicker
				$('#datepicker1').datepicker({
					inline: true
				});

			});
		</script>

</head>

<h4> Start Date </h4>

<?php
/*
 *Description of the line echo $this->Form->input('Date1 (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker','style' => 'width:150px'));
 *
 *adding datepicker to the textbox and setting the size of the textbox
 *
 *@author Youssef Madkour
 */
echo $this->Form->input('Date1 (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker','style' => 'width:150px'));
	  
?>
<h4> End Date </h4>

<?php
/*
 *Description of the line echo $this->Form->input('Date1 (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker1','style' => 'width:150px'));
 *
 *adding datepicker to the textbox and setting the size of the textbox
 *
 *@author Youssef Madkour
 */
echo $this->Form->input('Date2 (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker1','style' => 'width:150px'));
	  
?>




<?php
echo $this->Form->end('filtermentions');
?>

<table>
<?php
/*
 *Description of the line echo $this->Html->
 *link($account['Tweet']['postID'],array('controller'=>'posts','action'=>'view',$account['Tweet']['postID']));
 *
 *viewing the post id of the filtered tweets
 *
 *@author Noha Diaa
 */
 ?>
<?php
if($result != NULL){
 foreach($result as $account): ?>
 <tr>
   
<td>

<?php  echo $this->Html->link($account['Tweet']['postID'],array('controller'=>'posts','action'=>'view',$account['Tweet']['postID']));?>
 </td>
   
 </tr>
 
<?php endforeach; ?>
</table>
<?php }?>